SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 67298: A read-access or segmentation violation occurs when you access a DBMS with a DATEPART function in a WHERE clause

DetailsHotfixAboutRate It

A segmentation violation might occur when the following all occur:

  • You define a SAS® view of a database management system (DBMS) table with a WHERE clause that uses a DATEPART function.
  • You define a second SAS view of a second DBMS table. 
  • You define a third SAS view that joins the first two SAS views.
  • You then run a query against the third SAS view.

Here is an example of the WHERE clause:

WHERE DATEPART("31DEC2020:00:00:00"DT) BETWEEN DATEPART(start-date) and DATEPART(end-date)

The SAS log shows an error message and traceback message when you access the third SAS view:

ERROR:  An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [SQL (2) ]
Segmentation Violation
Traceback of the Exception:
/SAS/SASHome/SASFoundation/9.4/sasexe/sas(+0x17fc6e) [0x7f3e8e19fc6e]
/SAS/SASHome/SASFoundation/9.4/sasexe/sas(+0x503be) [0x7f3e8e0703be]
/SAS/SASHome/SASFoundation/9.4/sasexe/tkmk.so(bkt_signal_handler+0x14b) [0x7f3e8c0b12db]
/lib64/libpthread.so.0(+0x343fc0f790) [0x7f3e8d9d2790]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlu(+0x25184) [0x7f3e2d183184]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlu(+0x2418b) [0x7f3e2d18218b]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlu(+0x35be1) [0x7f3e2d193be1]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlu(+0x39f89) [0x7f3e2d197f89]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlu(sqltxt2+0x484) [0x7f3e2d16f6a4]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlp(+0x53347) [0x7f3e2d42d347]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlp(sqlpsel+0xdb8) [0x7f3e2d42bf78]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlp(sqlplan+0x219) [0x7f3e2d418129]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqlp(sqlprep+0x3ee) [0x7f3e2d44a92e]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqx(+0x44272) [0x7f3e2e099272]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassqx(sqlloop+0x33c) [0x7f3e2e09868c]
/SAS/SASHome/SASFoundation/9.4/sasexe/sassql(sassql+0x36d) [0x7f3e341c097d]
/SAS/SASHome/SASFoundation/9.4/sasexe/sas(vvtentr+0x17f) [0x7f3e8e06ff7f]
/lib64/libpthread.so.0(+0x343fc07a51) [0x7f3e8d9caa51]
/lib64/libc.so.6(clone+0x6d) [0x7f3e8d05896d]

The error has been reported while accessing Oracle or Teradata tables, but it might also be seen with other DBMS tables or views.

The only known workaround is to change one of the SAS views to a table. In general, that would be the third view mentioned above.

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASWindows 7 Ultimate x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Ultimate 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Professional x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Professional 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Home Premium x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Home Premium 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Enterprise x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Enterprise 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 20199.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 20169.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 Std9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 R2 Std9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 R2 Datacenter9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 Datacenter9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2008 for x649.4_M79.4 TS1M7
Microsoft Windows Server 2008 R29.4_M79.4 TS1M7
Microsoft Windows Server 20089.4_M79.4 TS1M7
Microsoft Windows 109.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Pro x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Pro 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Enterprise x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Enterprise 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Pro x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Pro 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Enterprise x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Enterprise 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft® Windows® for x649.4_M79.4_M89.4 TS1M79.4 TS1M8
z/OS 64-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
z/OS9.4_M79.4_M89.4 TS1M79.4 TS1M8
64-bit Enabled AIX9.4_M79.4_M89.4 TS1M79.4 TS1M8
64-bit Enabled Solaris9.4_M79.4_M89.4 TS1M79.4 TS1M8
HP-UX IPF9.4_M79.4_M89.4 TS1M79.4 TS1M8
Linux for x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Solaris for x649.4_M79.4_M89.4 TS1M79.4 TS1M8
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.